/**
 * Yumeitech.com.cn Inc.
 * Copyright (c) 2012-2017 All Rights Reserved.
 */
package run.tables.main;

/**
 * 带下划线表名转成驼峰式命名
 * @author w_jiangpengfei
 * @version $Id: TableNameToDOName.java, v 0.1 2017年4月11日 下午2:42:56 w_jiangpengfei Exp $
 */
public class TableNameToDOName {
    
    public static void main(String[] args) {
        String[] array = {
                          "plm_product","plm_ln_app","plm_fund_channel","plm_fund_pro_maping","plm_his_channel_pro_maping",
                          "plm_matched_model","plm_matched_model_detail","plm_matched_batch","plm_matched_batch_app_maping","plm_matched_batche_channel_maping",
                          "plm_matched_failed_batch","plm_matched_failed_batch_app","plm_fund_channel_loan","plm_app_cancel_loan","plm_app_flow",
                          "plm_offer_model","plm_offer_model_detail","plm_offer_batch","plm_offer_batch_app_maping","plm_offer_batch_detail",
                          "plm_offer_trans_serial","plm_back_offer_trans_serial","plm_app_payment_schedule","plm_app_repay_detail","plm_app_quitting_insurance",
                          "plm_app_advance_repay","plm_app_payment_change","plm_app_payment_reduce_periods","plm_app_refund","plm_app_clear_proof",
                          "plm_app_rate_relief","plm_app_bank_change","plm_app_repay_failed_change","plm_app_repay_ab_chane","plm_app_repay_wechat",
                          "trans_date","batch_task_model","batch_ctrl"
                          };
        toName(array);
    }
    
    /**
     * @param array
     */
    public static void toName(String array[]){
        for(int i = 0;i<array.length;i++){
            String tn = array[i];
            //截取下划线字符串
            String[] dnc = tn.split("_");
            String don = new String();
            //循环截取的字符串首字符转成大写进行拼接
            for(int j=0;j<dnc.length;j++){
                don += dnc[j].substring(0, 1).toUpperCase() + dnc[j].substring(1);
            }
            System.out.println(don);
        }
    }
}